/*
 * @Author: Bennent_G
 * @Date: 2024-12-23 16:14:13
 * @LastEditTime: 2025-03-27 14:22:05
 * @Description:
 */
import { createApp } from 'vue';
// import './assets/style/theme.scss';
import './style.css';
import App from './App.vue';

// 然后重新引入该模块
import 'virtual:svg-icons-register';
// mock
import './mock';
// pinia
import { createPinia } from 'pinia';
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
// 路由
import routers from './routers';
// UI
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import 'element-plus/theme-chalk/dark/css-vars.css';
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';

const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);

const app = createApp(App);

app.use(pinia);
app.use(routers);
app.use(ElementPlus, {
	locale: zhCn,
});
app.mount('#app');

// 全局注册所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
	app.component(key, component);
}
